import React from "react";
import { TodolistContext } from "./context";

class List extends React.Component {
    /* 
    ! 只要给组件设置静态属性contextType,
    ! 就能从实例的context属性获取值 
    */

    static contextType = TodolistContext;

    // !!!!! 注意{}的里面不能写对象，要转换成非对象的字符串
    render() {
        console.log(this.context);
        return (
            <ul>
                <li></li>
            </ul>
        );
    }
}
export default List;
